package com.regex.web.entity.sys;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
// import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.regex.web.common.excel.annotation.ExcelField;
import com.regex.web.entity.AutoIdBaseEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * <p>
 * 系统用户
 * </p>
 *
 * @author mhy
 * @since 2019-11-19
 */
@TableName("sys_user")
@Data
@EqualsAndHashCode(callSuper = true)
public class UserDTO extends AutoIdBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 用户名
     */
    @ExcelField(title="用户名", type=1, align=2 , sort=1)
    @TableField("login_name")
    private String loginName;

    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 手机号
     */
    @ExcelField(title="手机号", type=1, align=2 , sort=3)
    @TableField("phone")
    private String phone;

    /**
     * 邮箱
     */
    @ExcelField(title="邮箱", type=1, align=2 , sort=4)
    @TableField("email")
    private String email;

    /**
     * 姓名
     */
    @ExcelField(title="姓名", type=1, align=2 , sort=5)
    @TableField("name")
    private String name;

    /**
     * 头像
     */
    @ExcelField(title="头像", type=1, align=2 , sort=6)
    @TableField("head_pic")
    private String headPic;

    /**
     * 用户编码
     */
    @ExcelField(title="用户编码", type=1, align=2 , sort=7)
    @TableField("user_code")
    private String userCode;

    /**
     * token
     */
    @TableField("token")
    private String token;

    /**
     * 创建者
     */
    @ExcelField(title="创建者", type=1, align=2 , sort=9)
    @TableField("create_user")
    private Long createUser;

    /**
     * 来源
     */
    @ExcelField(title="来源", type=1, align=2 , sort=10)
    @TableField("source")
    private String source;

    /**
     * 用户状态
     */
    @ExcelField(title="用户状态", type=1, align=2 , sort=11)
    @TableField("state")
    private String state;
    
    @TableField(exist = false)
    private String roleState;
    
    @TableField(exist = false)
    private String roleName;

    @TableField(exist = false)
    private String dept_id;
    @Override
    protected Serializable pkVal() {
        return super.pkVal();
    }

    @Override
    public String toString() {
        return "UserDTO{" +
        "loginName=" + loginName +
        ", password=" + password +
        ", phone=" + phone +
        ", email=" + email +
        ", name=" + name +
        ", headPic=" + headPic +
        ", userCode=" + userCode +
        ", token=" + token +
        ", createUser=" + createUser +
        ", source=" + source +
        ", state=" + state +
        "}";
    }
}
